package com.example.JetpackDemoApp.ui.home.activities

import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.example.JetpackDemoApp.R
import com.example.JetpackDemoApp.databinding.ActivityLinearLayoutBinding

class LinearLayoutActivity: AppCompatActivity() {
    private lateinit var binding: ActivityLinearLayoutBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        binding = ActivityLinearLayoutBinding.inflate(layoutInflater)
//        setContentView(binding.root)
        setContentView(R.layout.activity_linear_layout)
//        获取按钮
        val button: Button = findViewById(R.id.button)
        println("Button===> ${button.text}") // Button===> Hello, I am a Button
        println("Button===> ${button.top}")
    }
}